FINS Thought Machine Accounts System API - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
Module | Description |
---|---|
CommonTools | This module provides utility functions and mappings for Financial Accounts and Transaction transformations |
create-account-tm-request | Create Account in Thought Machine request mapping |
get-account-audit-info-response | Account Action Log response mapping |
get-account-by-id-response | Retrieve Account from Thought Machine response mapping |
lookup-accounts-response | Retrieve Account from Thought Machine response mapping |
update-account-details-request | |
create-credit-transaction-request | Create Credit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping |
create-transfer-transaction-request | Create Transfer Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping |
create-debit-transaction-request | Create Debit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping |
get-transaction-list-response | Get Transaction from Thought Machine using the List Posting Instruction Batch operation. Maps the response to CIM using the mapToCIMFinancialTransaction function. |
ping-check-dependency-sys-api-response |
CommonTools
This module provides utility functions and mappings for Financial Accounts and Transaction transformations
Source:
./src/main/resources/dwl/CommonTools.dwl
Variables
var tmProductIdMap
This Product Id map is used by the conversion functions below.
var CIMProductIdMap
This map is used by the conversion function below.
var tmAccountStatusMap
This Account Status map is used by the conversion functions below.
var CIMAccountStatusMap
This map is used by the conversion function below.
Functions
fun getFormattedDateTime (toFormat)
Formats the date-time to the type accepted by CIM
fun getGlobalId (externalIdsArr)
This function filters ExternalIds with ExternalId Type as MDM and returns the first one
return Global ExternalID
fun tmRecordTypeToCIM (accountType)
Maps TM Product Id to CIM Account Type
return CIM Account Type
fun CIMRecordTypeToTM (accountType)
Map CIM Account Type to TM Product Id
return TM Product Id
fun tmAccountStatusToCIM (accountStatus)
Maps TM Account Status to CIM Account Status
return CIM Account Status
fun CIMAccountStatusToTM (accountStatus)
Map CIM Account Status to TM Account Status
return TM Product Id
fun formatAsDate (dateOrDateTime, defaultDate)
Formats given input date or date-time to a datetime in "yyyy-MM-dd'T'HH:mm:ss.SS'Z'" format
param
dateOrDateTime
input in either date or date-time format
paramdefaultDateTime
default timestamp to use in case input is null.
return datetime in "yyyy-MM-dd'T'HH:mm:ss.SS'Z'" format
fun getTransactionInstructionDetails (payload)
Maps CIM Transaction fields to Instruction Details in Thought Machine. Instruction Details is a Key Value pair that can be sent to Thought Machine while posting a transaction. Few of the fields from CIM payload are mapped as Key Value pair so that can be tied to the transaction posted for future retrieval.
param
Input
Transaction request in CIM format
return Instruction Details Object of Thought Machine
fun getInternalAccountIdOfPosting (instructionType)
Identifies Internal Bank Account from Thought Machine Posting Instruction .
param
instructionType
Posting Instruction as part of Posting Batch of Thought Machine
return internalAccountId Internal Bank Account associated with the Credit AccountId of transaction Object.
fun getCreditAccountId (instructionType, internalAccountId, accountId)
Identifies CreditAccountId from Thought Machine Posting Instruction .
param
instructionType
Posting Instruction as part of Posting Batch of Thought Machine
paramaccountId
- Account Id involved in the posting
paraminternalAccountId
Internal Account Id of the Bank involved in the posting
return CreditAccountId Credit AccountId of transaction Object.
fun getDebitAccountId (instructionType, internalAccountId, accountId)
Identifies DebitAccountId from Thought Machine Posting Instruction .
param
instructionType
Posting Instruction as part of Posting Batch of Thought Machine
paramaccountId
- Account Id involved in the posting
paraminternalAccountId
Internal Account Id of the Bank involved in the posting
return DebitAccountId Debit AccountId of transaction Object.
fun getTransactionType (internalAccountId, creditAccountId, debitAccountId)
Identifies Transaction Type associated with Thought Machine Posting Instruction .
param
internalAccountId
Internal Account Id of the Bank involved in the posting
paramcreditAccountId
Credit AccountId involved in the posting
paramdebitAccountId
- Debit AccountId involved in the posting
return TransactionType CIM Transaction type determined from the Posting Instruction.
fun getDetailsByPostingInstructionType (instructionType, accountId, internalAccountId)
Maps Thought Machine Posting Instruction to CIM Fields. Posting Instruction are used to determine the Amount, Transaction Type and Account IDs associated with the transaction based on posting type.
param
instructionType
Posting Instruction as part of Posting Batch of Thought Machine
paramaccountId
- Account Id involved in the posting
paraminternalAccountId
Internal Account Id of the Bank involved in the posting
return transaction CIM fields of transaction Object.
fun getAuditInfo (createdDate, createdBy, updatedDate, updatedBy)
Maps Thought Machine Posting Instruction to CIM auditInfo Fields. Posting Instruction are used to determine the Amount, Transaction Type and Account IDs associated with the transaction.
param
createdBy
Identifies the system or user which created the entity
paramcreatedDate
Timestamp of when the entity was created - default as current timestamp
paramupdatedBy
Identifies the system or user which last updated the entity
paramupdatedDate
Timestamp of when the entity was last updated
return auditInfo CIM AuditInfo Object related to Transaction.
fun getExternalIdsForMDM (externalId)
Maps the result of Thought Machine Posting Batch Instruction Details to CIM External IDs object if it contains the MDM Id (globalTransactionId) of the transaction.
param
externalId
- Global Transaction Id of the transaction
return externalIds - External Ids object that include Global Transaction Id for MDM
fun mapToCIMFinancialTransaction (postingBatch, accountId, userId)
Maps Thought Machine Posting Batch Response to CIM Financial Transaction JSON
param
postingBatch
- Posting Instruction Batch object response
paramaccountId
- Account Id involved in the posting
paramuserId
- System involved in the transaction
paramtransaction
- CIM Object of the transaction
create-account-tm-request
Create Account in Thought Machine request mapping
Source:
./src/main/resources/dwl/create-account-tm-request.dwl
Mapping Tables
The accounts endpoint of the Core API is used to Create an Account in Thought Machine Maps CIM Account to TM Account
TM Account | CIM | Description |
---|---|---|
request_id | The Unique identifier of the request in Thought Machine. This is set as an auto generate ID | |
account.product_id | depositAccountType | The product Id for the CIM Deposit Account Type in TM. |
account.permitted_denominations.request_initiator_id | accountCurrency | The denomination for the Account |
account.stakeholder_ids | primaryAccountOwner | The Identifier of the Customer to which this Account belongs to. |
account.instance_param_vals.interest_application_day | 1 | The day of the month on which interest is applied. |
account.instance_param_vals.daily_atm_withdrawal_limit | dailyWithdrawalLimit | Maximum amount that can be from this account using ATM per day |
account.instance_param_vals.standard_overdraft_limit | overdraftLimit | The Identifier of the Customer to which this Account belongs to. |
account.instance_param_vals.fee_free_overdraft_limit | overdraftLimit | The Identifier of the Customer to which this Account belongs to. |
account.opening_timestamp | openedDate | Date the account was opened. |
account.details.name | name | Descriptive name of the account. |
account.details.accountNumber | accountNumber | The Account Number assigned to the Account. |
account.details.accountLabel | accountLabel | A customer-provided nickname for the Account. |
account.details.notes | notes | Free-form notes recorded for this account. |
account.details.globalId | globalAccountID | The Global Identifier of the Account. |
get-account-audit-info-response
Account Action Log response mapping
Source:
./src/main/resources/dwl/get-account-audit-info-response.dwl
Mapping Tables
The action-logs endpoint of the Audit API is used to retrieve the Audit information of an Account in Thought Machine
action-logs Response | CIM | Description |
---|---|---|
action_logs.request_initiator_id | createdBy | The ID of the User who created the Account. |
action_logs.create_timestamp | createdDate | Timestamp of when the Account was last created. |
action_logs.request_initiator_id | updatedBy | The ID of the User who last update the Account. |
action_logs.create_timestamp | updatedDate | Timestamp of when the Account was last updated. |
get-account-by-id-response
Retrieve Account from Thought Machine response mapping
Source:
./src/main/resources/dwl/get-account-by-id-response.dwl
Mapping Tables
The accounts endpoint of the Core API is used to retrieve an Account from Thought Machine Maps TM Account to CIM Account
CIM Account | TM Account | Description |
---|---|---|
id | id | The Unique identifier of the Account in Thought Machine. |
name | details.name | Descriptive name of the account |
accountNumber | details.accountNumber | The Account Number assigned to the Account |
accountLabel | details.accountLabel | A customer-provided nickname for the Account |
depositAccountType | product_id | The Deposit Account Type of the This is derived using the Thought Machine Product ID |
accountCurrency | permitted_denominations | The denomination for the Account |
primaryAccountOwner | stakeholder_ids | The Identifier of the Customer to which this Account belongs to. |
openedDate | opening_timestamp | Date the account was opened. |
accountStatus | opening_timestamp | The Status of the Account |
externalIds[].externalId | GlobalId | Global ID of the Account |
auditInfo.createdDate | now() | Timestamp of when the customer was created - Set as Current Time. |
auditInfo.createdBy | createdByUserLogin | Identifies the system or user which created the customer. |
auditInfo.updatedDate | now() | Timestamp of when the customer was last updated. |
auditInfo.updatedBy | payload.body.CustInqResponse.MsgRsHdr.jXchangeHdr.AuditUsrId | Identifies the system or user which last updated the customer. |
auditInfo.isDeleted | false | Indicates whether or not the customer has been soft-deleted - Set as false. |
lookup-accounts-response
Retrieve Account from Thought Machine response mapping
Source:
./src/main/resources/dwl/lookup-accounts-response.dwl
Mapping Tables
The accounts endpoint of the Core API is used to retrieve an Account from Thought Machine Maps TM Account to CIM Account
CIM Account | TM Account | Description |
---|---|---|
id | id | The Unique identifier of the Account in Thought Machine. |
name | details.name | Descriptive name of the account |
accountNumber | details.accountNumber | The Account Number assigned to the Account |
accountLabel | details.accountLabel | A customer-provided nickname for the Account |
depositAccountType | product_id | The Deposit Account Type of the This is derived using the Thought Machine Product ID |
accountCurrency | permitted_denominations | The denomination for the Account |
primaryAccountOwner | stakeholder_ids | The Identifier of the Customer to which this Account belongs to. |
openedDate | opening_timestamp | Date the account was opened. |
accountStatus | opening_timestamp | The Status of the Account |
externalIds[].externalId | GlobalId | Global ID of the Account |
update-account-details-request
Source:
./src/main/resources/dwl/update-account-details-request.dwl
create-credit-transaction-request
Create Credit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping
Source:
./src/main/resources/dwl/create-credit-transaction-request.dwl
Mapping Tables
The transaction end point is used to Create Posting Instruction Batch Async in Thought Machine with a posting instruction of type inbound_hard_settlement. Maps TM Transaction from CIM
TM Transaction | CIM | Description |
---|---|---|
request_id | uuid | The Unique identifier of the request in Thought Machine. This is set as an auto generate ID |
posting_instruction_batch.client_id | config | Thought Machine Client Id |
posting_instruction_batch.client_batch_id | uuid | Unique Id for the Batch |
posting_instruction_batch.posting_instructions.client_transaction_id | uuid | A unique id to recognize the Transaction in Thought Machine |
posting_instruction_batch.posting_instructions.inbound_hard_settlement.amount | TransactionAmount | Amount involved in Transaction |
posting_instruction_batch.posting_instructions.inbound_hard_settlement.denomination | USD | Denomination as a configuration - default is USD |
posting_instruction_batch.posting_instructions.inbound_hard_settlement.target_account.accountId | accountId | Account Id involved for Credit of Transaction |
posting_instruction_batch.posting_instructions.inbound_hard_settlement.internal_account_id | config | Internal Account of the Bank already configured in Thought Machine to deal with Transactions |
posting_instruction_batch.posting_instructions.instruction_details | config | Internal Account of the Bank already configured in Thought Machine to deal with Transactions |
posting_instruction_batch.posting_instructions.instruction_details.name | Display name of this transaction | |
posting_instruction_batch.posting_instructions.instruction_details.description | Optional detailed description of this transaction | |
posting_instruction_batch.posting_instructions.instruction_details.checkNumber | checkNumber | optional check number associated with this transaction |
posting_instruction_batch.posting_instructions.instruction_details.notes | notes | Optional Free-form notes recorded for this transaction |
posting_instruction_batch.posting_instructions.instruction_details.transactionSubType | transactionSubType | Transaction sub types such as ATM or CARD or CASH or CHECK |
posting_instruction_batch.posting_instructions.instruction_details.accountOwnerId | accountOwnerId | The primary owner of the account this transaction was created for |
posting_instruction_batch.posting_instructions.instruction_details.transactionNumber | transactionNumber | A unique number assigned to this transaction |
create-transfer-transaction-request
Create Transfer Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping
Source:
./src/main/resources/dwl/create-transfer-transaction-request.dwl
Mapping Tables
The transaction end point is used to Create Posting Instruction Batch Async in Thought Machine with a posting instruction of type transfer.
TM Transaction | CIM | Description |
---|---|---|
request_id | uuid | The Unique identifier of the request in Thought Machine. This is set as an auto generate ID |
posting_instruction_batch.client_id | config | Thought Machine Client Id |
posting_instruction_batch.client_batch_id | uuid | Unique Id for the Batch |
posting_instruction_batch.posting_instructions.client_transaction_id | uuid | A unique id to recognize the Transaction in Thought Machine |
posting_instruction_batch.posting_instructions.transfer.amount | TransactionAmount | Amount involved in Transaction |
posting_instruction_batch.posting_instructions.transfer.denomination | USD | Denomination as a configuration - default is USD |
posting_instruction_batch.posting_instructions.transfer.target_account.creditor_target_account.accountId | creditAccountId | Creditor Account Id involved for Transfer Transaction |
posting_instruction_batch.posting_instructions.transfer.target_account.debtor_target_account.accountId | debitAccountId | Debitor Account Id involved for Transfer Transaction |
posting_instruction_batch.posting_instructions.instruction_details | config | Internal Account of the Bank already configured in Thought Machine to deal with Transactions |
posting_instruction_batch.posting_instructions.instruction_details.name | Display name of this transaction | |
posting_instruction_batch.posting_instructions.instruction_details.description | Optional detailed description of this transaction | |
posting_instruction_batch.posting_instructions.instruction_details.checkNumber | checkNumber | optional check number associated with this transaction |
posting_instruction_batch.posting_instructions.instruction_details.notes | notes | Optional Free-form notes recorded for this transaction |
posting_instruction_batch.posting_instructions.instruction_details.transactionSubType | transactionSubType | Transaction sub types such as ATM or CARD or CASH or CHECK |
posting_instruction_batch.posting_instructions.instruction_details.accountOwnerId | accountOwnerId | The primary owner of the account this transaction was created for |
posting_instruction_batch.posting_instructions.instruction_details.transactionNumber | transactionNumber | A unique number assigned to this transaction |
create-debit-transaction-request
Create Debit Transaction using Posting Instruction Batch Async operation in Thought Machine request mapping
Source:
./src/main/resources/dwl/create-debit-transaction-request.dwl
Mapping Tables
The transaction end point is used to Create Posting Instruction Batch Async in Thought Machine with a posting instruction of type outbound_hard_settlement.
TM Transaction | CIM | Description |
---|---|---|
request_id | uuid | The Unique identifier of the request in Thought Machine. This is set as an auto generate ID |
posting_instruction_batch.client_id | config | Thought Machine Client Id |
posting_instruction_batch.client_batch_id | uuid | Unique Id for the Batch |
posting_instruction_batch.posting_instructions.client_transaction_id | uuid | A unique id to recognize the Transaction in Thought Machine |
posting_instruction_batch.posting_instructions.outbound_hard_settlement.amount | TransactionAmount | Amount involved in Transaction |
posting_instruction_batch.posting_instructions.outbound_hard_settlement.denomination | USD | Denomination as a configuration - default is USD |
posting_instruction_batch.posting_instructions.outbound_hard_settlement.target_account.accountId | accountId | Account Id involved for Debit of Transaction |
posting_instruction_batch.posting_instructions.outbound_hard_settlement.internal_account_id | config | Internal Account of the Bank already configured in Thought Machine to deal with Transactions |
posting_instruction_batch.posting_instructions.instruction_details | config | Internal Account of the Bank already configured in Thought Machine to deal with Transactions |
posting_instruction_batch.posting_instructions.instruction_details.name | Display name of this transaction | |
posting_instruction_batch.posting_instructions.instruction_details.description | Optional detailed description of this transaction | |
posting_instruction_batch.posting_instructions.instruction_details.checkNumber | checkNumber | optional check number associated with this transaction |
posting_instruction_batch.posting_instructions.instruction_details.notes | notes | Optional Free-form notes recorded for this transaction |
posting_instruction_batch.posting_instructions.instruction_details.transactionSubType | transactionSubType | Transaction sub types such as ATM or CARD or CASH or CHECK |
posting_instruction_batch.posting_instructions.instruction_details.accountOwnerId | accountOwnerId | The primary owner of the account this transaction was created for |
posting_instruction_batch.posting_instructions.instruction_details.transactionNumber | transactionNumber | A unique number assigned to this transaction |
get-transaction-list-response
Get Transaction from Thought Machine using the List Posting Instruction Batch operation.
Maps the response to CIM using the mapToCIMFinancialTransaction function.
Source:
./src/main/resources/dwl/get-transaction-list-response.dwl
Mapping Tables
Maps Thought Machine Posting Batch Response to CIM Financial Transaction JSON
CIM Field | Thought Machine Posting Batch | Description | |
---|---|---|---|
id | client_transaction_id | transaction id | |
name | instruction_details.name | name related to the transaction | |
description | instruction_details.description | Description about the transaction | |
checkNumber | instruction_details.checkNumber | Optional check number associated with this transaction | |
transactionAmount | posting_instructions.(posting-type).amount | Amount associated with the Transaction | |
transactionDate | insertion_timestamp | Date and time this transaction was recorded in the system | |
transactionType | posting_instructions.(posting-type) | Discriminator property set to the specific type of transaction by name (e.g. | CreditTransaction) based on posting type |
transactionSubType | instruction_details.transactionSubType | Transaction sub type as ATM or CARD or CASH or CHECK | |
transactionStatus | status | transaction status such as CLEARED or HOLD or PENDING or POSTED | |
postedDate | value_timestamp | Date the transaction was actually reflected in the account (aka settlement date) | |
isDisputed | account_violations | Flags whether or not this transaction is being disputed | |
disputedReason | account_violations.type | The reason this transaction is being disputed | |
notes | instruction_details.notes | Free-form notes recorded for this transaction | |
creditAccountId | posting_instructions.(postings-type).account_id | Credit account id involved in transaction posting | |
debitAccountId | posting_instructions.(postings-type).account_id | Debit account id involved in transaction posting | |
externalIds.id | ID | Unique id of the entry | |
externalIds.externalId | globalTransactionId | A unique identifier of the Global Data object in MDM | |
externalIds.externalIdType | MDM | Identifies the type as MDM | |
externalIds.status | VALID | Indicates whether this identifier is currently valid or not | |
externalIds.statusLastChangedDate | current time | Date and time of the status | |
auditInfo.createdBy | Identifies the system or user which created the entity | ||
auditInfo.createdDate | postingBatch.insertion_timestamp | Timestamp of when the entity was created - default as current timestamp | |
auditInfo.updatedBy | Identifies the system or user which last updated the entity | ||
auditInfo.updatedDate | postingBatch.value_timestamp | Timestamp of when the entity was last updated | |
auditInfo.isDeleted | Coded as System API | Indicates whether or not the entity has been soft-deleted - default as false |
ping-check-dependency-sys-api-response
Source:
./src/main/resources/dwl/ping-check-dependency-sys-api-response.dwl